import typescript from 'rollup-plugin-typescript2'
import commonjs from 'rollup-plugin-commonjs'
import nodeResolve from 'rollup-plugin-node-resolve'

export default {
  input: 'src/index.ts',
  output: [
    {
      file: 'dist/canvasTable.cjs',
      format: 'cjs'
    },
    {
      file: 'dist/canvasTable.esm.js',
      format: 'esm'
    },
    {
      file: 'dist/canvasTable.umd.js',
      format: 'umd',
      name: 'canvasTable'
    }
  ],
  plugins: [
    typescript({
      tsconfig: './tsconfig.json'
    }),
    commonjs(),
    nodeResolve()
  ]
}
